﻿function SmartSpace() {
    this._callbackFunc = null;
    this.popup = function (url) {

        $("#ss_popup").css("display", "block");
        $("#ss_popup_frame").attr("src", url);

       this. _callbackFunc = null;
    }

    this.popup = function (url, callbackFunc) {

        $("#ss_popup").css("display", "block");
        $("#ss_popup_frame").attr("src", url);

        this._callbackFunc = callbackFunc
    }

    this.close = function (data) {
        $("#ss_popup").css("display", "none");
        if (this._callbackFunc != null) {
            this._callbackFunc(data);
        }
    }

    this.hide = function () {
        $("#ss_popup").css("display", "none");
    }
}

var _ss = new SmartSpace();
